package com.cy.store.service;

import com.cy.store.entity.Address;

import java.util.List;

/**
 * 收货地址接口
 */
public interface IAddressService {
    /**
     * 新增收货地址抽象方法
     * @param uid
     * @param username
     * @param address
     * @return
     */
    Void addNewAddress(Integer uid , String username, Address address);

    /**
     * 通过uid获取用户地址信息
     * @param uid
     * @return
     */
    List<Address> findInfoByUid(Integer uid);

    /**
     * 根据地址id修改地址为默认收货地址
     * @param aid
     * @param username
     * @return
     */
    void updateIsDefault(Integer uid,Integer aid,String username);

    /**
     * 通过地址id删除收货地址
     * @param aid
     * @param uid
     */
    void deleteAddressByAid(Integer aid,Integer uid,String username);

    /**
     * 通过用户id和地址id获取收货地址
     * @param uid
     * @param aid
     * @return
     */
    Address findAddressByUid(Integer uid,Integer aid);
}
